// Tab类型
export type Tab = {
   id: string;
   name: string;
   scale: number;
   offsetX: number;
   offsetY: number;
};

export type ConnectionSide = 'top' | 'right' | 'bottom' | 'left';

export type Connection = {
   id: string;
   from: string;
   to: string;
   fromSide: ConnectionSide;
   toSide: ConnectionSide;
   pathPoints?: { x: number; y: number }[];
   tabId: string;
};

export type Card = {
   id: string;
   title: string;
   content: string;
   color: string;
   x: number;
   y: number;
   width: number;
   height: number;
   tabId: string;
};

export type Handler = {
   position: string;
   style: React.CSSProperties;
};

export type Position = { x: number; y: number };

// API响应类型
export interface ApiResponse<T> {
   code: number;
   data?: T;
   message?: string;
   error?: any;
   token?: string;
}
